﻿#region Using directives

using System;
using System.Collections.Generic;
using System.Text;

using Weazel.Math;

using Microsoft.VisualStudio.TestTools.UnitTesting;

#endregion

namespace Weazel.Math.Test
{
  [TestClass]
  public class TestUnsignedMultiplication
  {
    /**************************************************************************
		 * Multiplication (width(result) = width(op1) + width(op2))
		 **************************************************************************/
    [TestMethod]
    public void TestUnsignedMultiplication_1()
    {
      Integer a = new Integer(8, 0, false);
      Integer b = new Integer(8, 1, false);
      Assert.AreEqual("0", (a * b).ToDecimalString());
    }

    [TestMethod]
    public void TestUnsignedMultiplication_2()
    {
      Integer a = new Integer(8, 10, false);
      Integer b = new Integer(8, 10, false);
      Assert.AreEqual("100", (a * b).ToDecimalString());
    }

    [TestMethod]
    public void TestUnsignedMultiplication_3()
    {
      Integer a = new Integer(8, 15, false);
      Integer b = new Integer(8, 15, false);
      Assert.AreEqual("225", (a * b).ToDecimalString());
    }
  }
}
